<?php

require_once dirname(__FILE__).'/../lib/usersGeneratorConfiguration.class.php';
require_once dirname(__FILE__).'/../lib/usersGeneratorHelper.class.php';

/**
 * users actions.
 *
 * @package    jobeet
 * @subpackage users
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class usersActions extends autoUsersActions
{
  public function executeExportEmail()
  {
    $this->setLayout(false);
    $this->emails = Doctrine::getTable('Newsletter')->findAll();
    $this->getResponse()->setContentType('application/txt');
    $this->getResponse()->setHttpHeader('Content-Disposition', 'attachment; filename="emails.txt"');
    foreach($this->emails as $email) {
      echo $email['email'] . "\n";
    }
    return sfView::NONE;
  }
}